<template>
  <h1>vue-router@4</h1>
  <router-link to="/register">注册</router-link>
  <router-link to="/login">登录</router-link>
  <!-- router-link to  to既可以是字符串 也可以是对象  对象当中既可以是name 也可以是path  都可以进行跳转-->
  <!-- <router-link :to="{ name: 'home' }">主页</router-link> -->
  <router-link :to="{ path: '/home' }">主页</router-link>

  <router-view></router-view>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  setup() {
    return {};
  },
});
</script>

<style scoped>
</style>